<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>&nbsp;</title>
    </head>
    <body>
     
         <form id="fm" method="post" >
        
                <div style="margin-bottom:10px">
                        <input id="txhash" class="easyui-textbox" name="txhash" style="width:100%" data-options="label:'交易单号:',required:true">
                </div>
        </form>
        <div style="text-align:center;padding:5px">
            <a href="javascript:void(0)" class="easyui-linkbutton" onclick="submitForm()" style="width:80px">保存</a>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <#if bcRecord??>
                <a href="javascript:void(0)" class="easyui-linkbutton" onclick="closeForm()" style="width:80px">关闭</a>
            <#else> 
                <a href="javascript:void(0)" class="easyui-linkbutton" onclick="clearForm()" style="width:80px">重置</a>
            </#if>
        </div>
       
       <script type="text/javascript">
            function submitForm(){
            	
            	$.post(
            		'app/bcRecord/fresh',{
            			txhash:$('#txhash').val()
            		},function(rs){
                		if(rs.code>0){
                			window.parent.tips(rs.desc);
                		}else{
                			window.parent.tips('添加成功');
                		}
                		$('#form').dialog('close');
            		},'json'		
            	)
            	
               /*  $('#fm').form('submit',{
                	success:function(r){
                		var rs=JSON.parse(r);
                		if(rs.code>0){
                			window.parent.tips(rs.desc);
                		}else{
                			window.parent.tips('添加成功');
                		}
                		$('#form').dialog('close');
                	}
                }); */
            }
            function clearForm(){
                $('#fm').form('clear');
            }
            function closeForm(){
            	$('#form').dialog('close');
            }
       </script>
    </body>
     
</html>